<!-- 订单搜索 -->
<div class="form-div">
	<form action="javascript:searchOrder()" name="searchForm">
		<img src="__PUBLIC__/image/admin/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
		发货单号<input name="delivery_sn" type="text" id="delivery_sn" size="15">
		订单号<input name="order_sn" type="text" id="order_sn" size="15">
		收货人<input name="consignee" type="text" id="consignee" size="15">
		<input type="submit" value="{:L('button_search')}"  />
	</form>
</div>
<script language="JavaScript">
	listTable.recordCount = 5;
	listTable.pageCount = 1;

	listTable.filter.delivery_sn = '';
	listTable.filter.order_sn = '';
	listTable.filter.order_id = '0';
	listTable.filter.consignee = '';
	listTable.filter.status = '-1';
	listTable.filter.sort_by = 'update_time';
	listTable.filter.sort_order = 'DESC';
	listTable.filter.page = '1';
	listTable.filter.page_size = '15';
	listTable.filter.record_count = '5';
	listTable.filter.page_count = '1';

	onload = function()
	{
		// 开始检查订单
		//startCheckOrder();
		//
		listTable.query = "delivery_query";
	}

	/**
	 * 搜索订单
	 */
	function searchOrder()
	{
		listTable.filter['order_sn'] = Utils.trim(document.forms['searchForm'].elements['order_sn'].value);
		listTable.filter['consignee'] = Utils.trim(document.forms['searchForm'].elements['consignee'].value);
		listTable.filter['status'] = document.forms['searchForm'].elements['status'].value;
		listTable.filter['delivery_sn'] = document.forms['searchForm'].elements['delivery_sn'].value;
		listTable.filter['page'] = 1;
		listTable.query = "delivery_query";
		listTable.loadList();
	}

	function check()
	{
	  var snArray = new Array();
	  var eles = document.forms['listForm'].elements;
	  for (var i=0; i<eles.length; i++)
	  {
		if (eles[i].tagName == 'INPUT' && eles[i].type == 'checkbox' && eles[i].checked && eles[i].value != 'on')
		{
		  snArray.push(eles[i].value);
		}
	  }
	  if (snArray.length == 0)
	  {
		return false;
	  }
	  else
	  {
		eles['order_id'].value = snArray.toString();
		return true;
	  }
	}
</script>
